<template>
  <div class="resume-page">
    <div class="container">
      <!-- 页面头部 -->
      <div class="page-header fade-in">
        <h1 class="page-title gradient-text">个人简历</h1>
        <p class="page-subtitle">前端开发者 | UI设计师 | 技术爱好者</p>
      </div>

      <div class="resume-content">
        <!-- 左侧个人信息 -->
        <div class="resume-left fade-in" style="animation-delay: 0.1s">
          <!-- 个人信息卡片 -->
          <div class="profile-card card hover-lift">
            <div class="profile-avatar">
              <div class="avatar-placeholder gradient-animation">DHL</div>
            </div>
            <div class="profile-info">
              <h2 class="profile-name">DHL</h2>
              <p class="profile-title">前端开发工程师</p>
              <p class="profile-location">📍 中国</p>
            </div>

            <div class="profile-contact">
              <div class="contact-item">
                <span class="contact-icon">📧</span>
                <span>your@email.com</span>
              </div>
              <div class="contact-item">
                <span class="contact-icon">📱</span>
                <span>+86 138-0000-0000</span>
              </div>
              <div class="contact-item">
                <span class="contact-icon">🔗</span>
                <a href="https://github.com" target="_blank">GitHub</a>
              </div>
            </div>
          </div>

          <!-- 技能卡片 -->
          <div class="skills-card card hover-lift">
            <h3 class="card-title">技术栈</h3>
            <div class="skills-list">
              <div class="skill-category">
                <h4>前端技术</h4>
                <div class="skill-tags">
                  <span class="skill-tag">Vue.js</span>
                  <span class="skill-tag">Nuxt.js</span>
                  <span class="skill-tag">React</span>
                  <span class="skill-tag">TypeScript</span>
                  <span class="skill-tag">JavaScript</span>
                </div>
              </div>

              <div class="skill-category">
                <h4>样式与设计</h4>
                <div class="skill-tags">
                  <span class="skill-tag">CSS3</span>
                  <span class="skill-tag">Tailwind CSS</span>
                  <span class="skill-tag">SCSS</span>
                  <span class="skill-tag">UI/UX 设计</span>
                  <span class="skill-tag">响应式设计</span>
                </div>
              </div>

              <div class="skill-category">
                <h4>工具与平台</h4>
                <div class="skill-tags">
                  <span class="skill-tag">Git</span>
                  <span class="skill-tag">Webpack</span>
                  <span class="skill-tag">Vite</span>
                  <span class="skill-tag">Figma</span>
                  <span class="skill-tag">VS Code</span>
                </div>
              </div>
            </div>
          </div>

          <!-- 语言能力 -->
          <div class="languages-card card hover-lift">
            <h3 class="card-title">语言能力</h3>
            <div class="languages-list">
              <div class="language-item">
                <span>中文</span>
                <div class="language-level">
                  <div class="level-dot active"></div>
                  <div class="level-dot active"></div>
                  <div class="level-dot active"></div>
                  <div class="level-dot active"></div>
                  <div class="level-dot active"></div>
                </div>
              </div>
              <div class="language-item">
                <span>英语</span>
                <div class="language-level">
                  <div class="level-dot active"></div>
                  <div class="level-dot active"></div>
                  <div class="level-dot active"></div>
                  <div class="level-dot"></div>
                  <div class="level-dot"></div>
                </div>
              </div>
            </div>
          </div>
        </div>

        <!-- 右侧主要内容 -->
        <div class="resume-right">
          <!-- 工作经历 -->
          <section class="experience-section fade-in" style="animation-delay: 0.2s">
            <h2 class="section-title">工作经历</h2>

            <div class="timeline">
              <div class="timeline-item">
                <div class="timeline-marker"></div>
                <div class="timeline-content card hover-lift">
                  <div class="timeline-header">
                    <h3>高级前端开发工程师</h3>
                    <span class="timeline-date">2023 - 至今</span>
                  </div>
                  <div class="timeline-company">某科技公司</div>
                  <div class="timeline-description">
                    <ul>
                      <li>负责公司核心产品的前端架构设计和开发</li>
                      <li>带领团队完成多个大型项目的重构和优化</li>
                      <li>引入现代化开发工具和流程，提升团队效率</li>
                      <li>参与产品设计评审，提供技术可行性建议</li>
                    </ul>
                  </div>
                </div>
              </div>

              <div class="timeline-item">
                <div class="timeline-marker"></div>
                <div class="timeline-content card hover-lift">
                  <div class="timeline-header">
                    <h3>前端开发工程师</h3>
                    <span class="timeline-date">2021 - 2023</span>
                  </div>
                  <div class="timeline-company">某互联网公司</div>
                  <div class="timeline-description">
                    <ul>
                      <li>参与公司电商平台的前端开发工作</li>
                      <li>优化网站性能，提升用户体验</li>
                      <li>开发可复用的组件库，提高开发效率</li>
                      <li>与后端团队协作，实现前后端分离架构</li>
                    </ul>
                  </div>
                </div>
              </div>

              <div class="timeline-item">
                <div class="timeline-marker"></div>
                <div class="timeline-content card hover-lift">
                  <div class="timeline-header">
                    <h3>前端开发实习生</h3>
                    <span class="timeline-date">2020 - 2021</span>
                  </div>
                  <div class="timeline-company">某创业公司</div>
                  <div class="timeline-description">
                    <ul>
                      <li>学习并实践前端开发技术栈</li>
                      <li>参与公司官网和内部管理系统的开发</li>
                      <li>协助团队完成日常开发任务</li>
                      <li>学习敏捷开发流程和团队协作</li>
                    </ul>
                  </div>
                </div>
              </div>
            </div>
          </section>

          <!-- 项目经验 -->
          <section class="projects-section fade-in" style="animation-delay: 0.3s">
            <h2 class="section-title">项目经验</h2>

            <div class="projects-grid">
              <div class="project-card card hover-lift">
                <div class="project-header">
                  <h3>企业级管理系统</h3>
                  <div class="project-tags">
                    <span class="project-tag">Vue 3</span>
                    <span class="project-tag">TypeScript</span>
                    <span class="project-tag">Element Plus</span>
                  </div>
                </div>
                <p class="project-description">
                  为企业客户定制的内部管理系统，包含用户管理、数据统计、权限控制等功能模块。
                </p>
                <div class="project-achievements">
                  <ul>
                    <li>实现组件化开发，代码复用率提升60%</li>
                    <li>优化打包配置，首屏加载时间减少40%</li>
                    <li>引入TypeScript，减少运行时错误</li>
                  </ul>
                </div>
              </div>

              <div class="project-card card hover-lift">
                <div class="project-header">
                  <h3>电商平台重构</h3>
                  <div class="project-tags">
                    <span class="project-tag">Nuxt 3</span>
                    <span class="project-tag">Tailwind CSS</span>
                    <span class="project-tag">Vuex</span>
                  </div>
                </div>
                <p class="project-description">
                  对现有电商平台进行技术重构，提升用户体验和开发效率。
                </p>
                <div class="project-achievements">
                  <ul>
                    <li>采用服务端渲染，SEO效果提升显著</li>
                    <li>实现响应式设计，适配多端设备</li>
                    <li>优化图片懒加载，页面性能提升50%</li>
                  </ul>
                </div>
              </div>

              <div class="project-card card hover-lift">
                <div class="project-header">
                  <h3>移动端应用</h3>
                  <div class="project-tags">
                    <span class="project-tag">React Native</span>
                    <span class="project-tag">Redux</span>
                    <span class="project-tag">Expo</span>
                  </div>
                </div>
                <p class="project-description">
                  开发跨平台移动应用，提供流畅的用户体验和丰富的功能。
                </p>
                <div class="project-achievements">
                  <ul>
                    <li>实现原生模块集成，提升应用性能</li>
                    <li>优化动画效果，提升用户体验</li>
                    <li>支持离线功能，增强应用可用性</li>
                  </ul>
                </div>
              </div>
            </div>
          </section>

          <!-- 教育背景 -->
          <section class="education-section fade-in" style="animation-delay: 0.4s">
            <h2 class="section-title">教育背景</h2>

            <div class="education-item card hover-lift">
              <div class="education-header">
                <h3>计算机科学与技术</h3>
                <span class="education-date">2017 - 2021</span>
              </div>
              <div class="education-school">某大学</div>
              <div class="education-description">
                <p>
                  主修计算机科学，专注于前端开发和用户体验设计。在校期间参与多个项目实践，获得优秀毕业生称号。
                </p>
              </div>
            </div>
          </section>
        </div>
      </div>

      <!-- 下载简历按钮 -->
      <div class="download-section fade-in" style="animation-delay: 0.5s">
        <button class="btn btn-gradient hover-lift download-btn">📄 下载简历 PDF</button>
      </div>
    </div>
  </div>
</template>

<script setup>
useHead({
  title: '简历',
})
</script>

<style scoped>
.resume-page {
  min-height: 100vh;
  padding: 2rem 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 3rem 0;
}

.page-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.page-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

/* Resume Content Layout */
.resume-content {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

/* Left Sidebar */
.resume-left {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Profile Card */
.profile-card {
  text-align: center;
  padding: 2rem;
}

.profile-avatar {
  margin-bottom: 1.5rem;
}

.avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.profile-name {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.profile-title {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.profile-location {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.profile-contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-item a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: #667eea;
}

/* Skills Card */
.skills-card {
  padding: 2rem;
}

.card-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.skill-category h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  padding: 0.4rem 0.8rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

/* Languages Card */
.languages-card {
  padding: 2rem;
}

.languages-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.language-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.language-level {
  display: flex;
  gap: 0.25rem;
}

.level-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-color);
  transition: all 0.3s ease;
}

.level-dot.active {
  background: var(--rainbow-gradient);
}

/* Right Content */
.resume-right {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

/* Timeline */
.timeline {
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-marker {
  position: absolute;
  left: 16px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rainbow-gradient);
  z-index: 2;
}

.timeline-content {
  margin-left: 3rem;
  padding: 1.5rem;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.timeline-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
  white-space: nowrap;
}

.timeline-company {
  color: #667eea;
  font-weight: 500;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.timeline-description ul {
  list-style: none;
  padding: 0;
}

.timeline-description li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.timeline-description li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #667eea;
  font-weight: bold;
}

/* Projects Grid */
.projects-grid {
  display: grid;
  gap: 1.5rem;
}

.project-card {
  padding: 1.5rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.project-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-tag {
  padding: 0.3rem 0.6rem;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
}

.project-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-achievements ul {
  list-style: none;
  padding: 0;
}

.project-achievements li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.9rem;
}

.project-achievements li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #43e97b;
  font-weight: bold;
}

/* Education Section */
.education-item {
  padding: 1.5rem;
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.education-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.education-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
  white-space: nowrap;
}

.education-school {
  color: #667eea;
  font-weight: 500;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.education-description p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Download Section */
.download-section {
  text-align: center;
  padding: 2rem 0;
}

.download-btn {
  font-size: 1.1rem;
  padding: 1rem 2rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .resume-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .resume-left {
    order: 2;
  }

  .resume-right {
    order: 1;
  }
}

@media (max-width: 768px) {
  .page-header {
    padding: 2rem 0;
  }

  .timeline::before {
    left: 15px;
  }

  .timeline-marker {
    left: 11px;
  }

  .timeline-content {
    margin-left: 2.5rem;
  }

  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .project-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .education-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
</style>
